import request from '@/utils/request'

//列表
 export function getcoachList(data){
    return request({
        url: 'coach',
        method: 'get',
        params:data
      })
}

//新增
export function createCoach(data){
    return request({
        url: 'coach/create',
        method: 'post',
        data:data
      })
}

//获取详情页面
export function readData(data){
    return request({
        url: 'coach/read',
        method: 'get',
        params:data,
        headers:{
          'showLoading':false
        }
      })
}

//编辑
export function updateData(data){
    return request({
        url: 'coach/update',
        method: 'put',
        data:data
    })
}

//删除
export function deleteItem(data){
    return request({
        url: 'coach/delete',
        method: 'delete',
        data:data
      })
}

//选项
export function getOption(data){
    return request({
        url: 'train/option',
        method: 'get',
        params:data
      })
}

//关联车辆数据
export function getCarOption(){
    return request({
        url: 'car/option',
        method: 'get'
      })
}
